home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Run Magazine ReRun 1985 Winter
/
rerun-1985-winter.d64
/
spirited sprites
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
6KB
|
169 lines
10 q=1:h=1:e=334:pokee,32:pokee+1,32:pokee+2,14:cc=54272:m3=14:x=1075:ex=33
15 print"[147]","hang on for 7 seconds"
20 ifww=1then30
25 fort=49152to49863:reada:poket,a:next
30 v=53248:pokev+28,0:ww=1
35 pokev,40:pokev+1,190:pokev+2,40:pokev+3,150:pokev+39,m3:pokev+40,m3
40 pokev+4,40:pokev+5,110:pokev+41,m3:poke2042,194
45 poke2040,192:poke2041,193:pokev+21,15
50 sys 49152:poke650,128
55 poke53281,14:print"[147]":poke53281,1:poke53280,15
60 print"[144] d=data [152] j=left l=right i=up k=down ";
65 print" s=move y"
70 print"[156] z=move x"
75 print"[159] c=multi "
80 print" ctrl=rvs"
85 print" com=flip"
90 print"[129] spa=fill[154]"
95 print"2":print"1":print"0"
100 print" f1 shft f3 ex-v f5 an-2 f7 draw ";
105 print" f2 clr f4 ex-h f6 an-3 f8 red0 [152][146]";:poke2023,160
110 fort=1to21:print,"[157] ",," ";:next
115 print,"[157] sprite artist by mj [145][145][145]":x=1075
120 print"",,,"[144]_ to [157][157][157][157][157]reset[152]"
125 sr=1024:x=10:y=1:sc=y*40+x+sr:pokesc,102:cr=160
130 z=peek(197):zz=peek(653):zx=0
135 ifz=34thengosub390
140 ifz=42thengosub405
145 ifz=37thengosub420
150 ifz=33thengosub435
155 ifz=60thengosub510
160 ifz=20then360
165 ifz=57then10
170 ifz=18then260
175 ifz=13then205
180 ifz=12then545
185 ifz=56thenq=1
190 ifz=59thenq=2
195 ifz=8thenq=3
200 goto130
205 print"[147] press number (0 - 2) of sprite":poke198,0
210 geta$:ifa$=""then210
215 print" - [146] (down), + [146] (up) or return [146] to exit"
220 y=1:getb$:ifb$="+"theny=-1:goto240
225 ifb$=chr$(13)then55
230 ifval(b$)>0andval(b$)<4thena$=b$:goto220
235 ifb$<>"-"then220
240 x=val(a$):ifx=>2thenx=5
245 ifx=1thenx=3
250 ifx=0thenx=1
255 pokev+x,peek(v+x)+y:goto220
260 poke198,0:input"[147]name of sprite";n$
265 print"data to s[146]creen, p[146]rinter, or d[146]isk"
270 getp$:ifp$="s"then315
275 ifp$="d"then330
280 ifp$<>"p"then270
285 open3,4:cmd3
290 print,,,,n$:print:print
295 fort=12288 to 12350 step10
300 fori=0to9
305 printpeek(t+i)",";:next:print:print:next
310 print#3:close3:goto55
315 print"[147]":fort=12288 to 12350 step 3
320 print,peek(t),peek(t+1),peek(t+2):next
325 end
330 input"s[146]ave or l[146]oad";s$
335 ifs$="l"then355
340 open1,8,1,n$
345 sys65418:poke780,251:poke251,0:poke252,48:poke781,192:poke782,48:sys65496
350 close1:goto10
355 sys65418:loadn$,8,1
360 poke198,0
365 ex=32:h=2:v=53248:input"[147]multi color 1 ( *)";m1
370 input"multi color 2 (**)";m2
375 input"sprite color (* )";m3
380 pokev+28,7:pokev+37,m1:pokev+38,m2
385 goto35
390 x=x-h:ifx<10thenx=ex
395 ifzz=1thenx=x-h:z=60:return
400 gosub450:return
405 ifzz=1thenz=60:return
410 x=x+h:ifx>exthenx=10
415 gosub450:return
420 y=y+1:ify>21theny=1
425 ifzz=1thenx=x-h:z=60:return
430 gosub450:return
435 y=y-1:ify<1theny=21
440 ifzz=1thenx=x-h:z=60:return
445 gosub450:return
450 ifh=2then470
455 pokesc,peek(e):sc=y*40+x+sr
460 pokee,peek(sc):pokesc,102
465 cr=160:return
470 cv=sc+cc
475 pokesc,peek(e):pokesc+1,peek(e+1)
480 pokecv,peek(e+2):pokecv+1,peek(e+2)
485 sc=y*40+x+sr
490 pokee,peek(sc):pokee+1,peek(sc+1)
495 pokee+2,peek(sc+cc)
500 pokesc,102:pokesc+1,102
505 return
510 ifh=2then560
515 ifzz=1then530
520 ifpeek(e)=160thencr=32
525 ifpeek(e)<>160thencr=160
530 pokesc,cr
535 pokee,cr:x=x+1:ifx>33thenx=10
540 gosub450:return
545 print"[147] return [146] to exit"
550 pokev,(peek(v)+1)and255:ifpeek(197)<>1then550
555 goto35
560 cr=160:cs=224:cv=sc+cc
565 ifzz=1then575
570 ifpeek(e)<>32thencr=32:pokesc,cr:pokesc+1,cr:r=32:goto590
575 ifq=1thenr=cr:cr=cs:pokesc,cr:pokesc+1,r:pokecv,m1:pokecv+1,m1:pokee+2,m1
580 ifq=2thenr=cs:pokesc,cr:pokesc+1,r:pokecv,m3:pokecv+1,m3:pokee+2,m3
585 ifq=3thenr=cr:pokesc,cr:pokesc+1,cr:pokecv,m2:pokecv+1,m2:pokee+2,m2
590 pokee,cr:pokee+1,r:x=x+2:ifx>32thenx=10
595 gosub470:return
600 data 120, 169, 13, 141, 20, 3, 169, 192, 141, 21, 3, 88, 96, 165, 80
605 data 201, 48, 208, 73, 169, 12, 133, 80, 173, 141, 2, 201, 1, 240, 32
610 data 234, 165, 197, 201, 3, 208, 3, 32, 141, 192, 201, 6, 208, 3, 32
615 data 118, 192, 201, 4, 208, 3, 32, 117, 193, 201, 5, 240, 48, 76, 1
620 data 194, 234, 165, 197, 201, 4, 208, 3, 32, 147, 193, 201, 6, 208, 3
625 data 32, 51, 193, 201, 5, 208, 3, 32, 97, 192, 201, 3, 208, 3, 32
630 data 182, 194, 230, 80, 76, 49, 234, 173, 29, 208, 73, 1, 141, 29, 208
635 data 96, 173, 23, 208, 73, 1, 141, 23, 208, 76, 49, 234, 234, 173, 248
640 data 7, 201, 192, 240, 6, 206, 248, 7, 76, 134, 192, 238, 248, 7, 169
645 data 32, 133, 80, 96, 234, 234, 162, 0, 160, 0, 132, 253, 169, 50, 133
650 data 251, 169, 4, 133, 252, 177, 251, 201, 160, 208, 4, 56, 76, 166, 192
655 data 24, 62, 0, 48, 230, 253, 165, 253, 201, 8, 208, 9, 169, 0, 133
660 data 253, 232, 224, 63, 240, 23, 200, 192, 24, 208, 220, 24, 165, 251,105
665 data 40, 133, 251, 165, 252, 105, 0, 133, 252, 160, 0, 76, 155, 192, 96
670 data 162, 64, 189, 255, 47, 157, 191, 48, 202, 208, 247, 162, 0, 134, 253
675 data 160, 0, 169, 50, 133, 251, 169, 4, 133, 252, 189, 192, 48, 41, 128
680 data 240, 21, 169, 160, 145, 251, 62, 192, 48, 200, 32, 12, 193, 224, 63
685 data 240, 20, 234, 234, 234, 76, 235, 192, 169, 32, 76, 244, 192, 230, 253
690 data 165, 253, 201, 8, 240, 1, 96, 169, 0, 133, 253, 232, 234, 192, 24
695 data 240, 4, 234, 76, 20, 193, 160, 0, 24, 165, 251, 105, 40, 133, 251
700 data 165, 252, 105, 0, 133, 252, 96, 173, 248, 7, 201, 192, 240, 6, 206
705 data 248, 7, 76, 70, 193, 238, 248, 7, 238, 248, 7, 169, 32, 133, 80
710 data 96, 169, 0, 133, 251, 169, 4, 133, 252, 160, 0, 177, 251, 201, 32
715 data 208, 21, 145, 251, 200, 208, 245, 230, 252, 165, 252, 201, 7, 240, 3
720 data 76, 85, 193, 192, 224, 208, 230, 96, 169, 32, 76, 91, 193, 162, 64
725 data 189, 127, 48, 157, 191, 48, 189, 63, 48, 157, 127, 48, 189, 255, 47
730 data 157, 63, 48, 189, 191, 48, 157, 255, 47, 202, 208, 229, 96, 162, 21
735 data 169, 49, 133, 251, 169, 4, 133, 252, 160, 24, 169, 32, 145, 251, 136
740 data 208, 251, 202, 240, 14, 24, 165, 251, 105, 40, 133, 251, 144, 235
745 data 230, 252, 76, 157, 193, 96
750 data 24, 162, 0, 160, 8, 62, 0, 48, 126, 2, 49, 136, 208, 247
755 data 232, 232, 232, 224, 63, 208, 238, 162, 0, 160, 8, 62, 2, 48
760 data 126, 0, 49, 136, 208, 247, 232, 232, 232, 224, 63, 208, 238, 162
765 data 0, 160, 8, 62, 1, 48, 126, 1, 49, 136, 208, 247, 232, 232
770 data 232, 224, 63, 208, 238, 162, 64, 189, 255, 48, 157, 255, 47, 202
775 data 208, 247, 96, 173, 141, 2, 201, 4, 208, 3, 76, 194, 194, 201
780 data 2, 208, 3, 32, 21, 194, 76, 92, 192, 162, 64, 189, 255, 47
785 data 157, 63, 49, 202, 208, 247, 169, 63, 133, 34, 169, 49, 133, 35
790 data 162, 63, 160, 3, 177, 34, 157, 255, 47, 202, 240, 12, 136, 208
795 data 245, 230, 34, 230, 34, 230, 34, 76, 42, 194, 96, 162, 21, 169
800 data 50, 133, 34, 133, 36, 169, 216, 133, 37, 169, 4, 133, 35, 160
805 data 0, 177, 34, 201, 160, 240, 10, 200, 177, 34, 201, 160, 240, 36
810 data 76, 145, 194, 200, 177, 34, 201, 160, 240, 15, 169, 224, 145, 34
815 data 173, 39, 208, 145, 36, 136, 145, 36, 76, 146, 194, 173, 38, 208
820 data 145, 36, 136, 145, 36, 76, 146, 194, 136, 169, 224, 145, 34, 173
825 data 37, 208, 145, 36, 200, 145, 36, 136, 200, 200, 192, 24, 208, 187
830 data 202, 240, 26, 234, 234, 234, 24, 165, 36, 105, 40, 133, 36, 24
835 data 165, 34, 105, 40, 133, 34, 144, 163, 230, 35, 230, 37, 76, 81
840 data 194, 96, 32, 210, 192, 173, 28, 208, 240, 3, 32, 65, 194, 96
845 data 32, 184, 193, 76, 92, 192